package com.sxjh.mapper;

import com.sxjh.entity.bo.Finance3CbBo;
import com.sxjh.entity.bo.FinanceHgylCgBo;
import com.sxjh.entity.param.BalanceRepostParam;
import com.sxjh.entity.param.FinancialSalesRepostParam;
import com.sxjh.entity.result.BalanceRepostResult;
import com.sxjh.entity.result.FinancialRepostResult;
import com.sxjh.entity.result.SalesReport;
import com.sxjh.entity.result.StatisticalBillsResult;
import org.apache.ibatis.annotations.Insert;

import java.util.List;
import java.util.Map;

/**
 * @author zxz
 * @Date 2021/11/19
 * @Description:
 */
public interface FinancialRepostMapper {
    List<FinancialRepostResult> getFinancialSalesRepost(FinancialSalesRepostParam param);

    /**
     * 获取税率
     * @param param
     * @return
     */
    List<SalesReport> getSalesRepost(FinancialSalesRepostParam param);

    /**
     * 炭黑分类统计报表
     * @param param
     * @return
     */
    List<FinancialRepostResult> getStatisticalBills(FinancialSalesRepostParam param);

    List<FinancialRepostResult> getFinancialZcSalesRepost(FinancialSalesRepostParam param);

    List<FinanceHgylCgBo> getChemicalRawMaterialPurchaseReport(FinancialSalesRepostParam param);

    /**
     * 获取本月余额
     *
     * @param param
     * @return
     */
    List<BalanceRepostResult> getThisMonthBalance(BalanceRepostParam param);

    /**
     * 获取之前的余额
     *
     * @param param
     * @return
     */
    List<BalanceRepostResult> getPastMonthBalance(BalanceRepostParam param);

    //    @Insert("INSERT INTO `sxjh`.`balance_settlement` (`company_id`, `company_name`, `last_month_balance`, `ready_money`, `acceptance`, `transfer`, `balance`, `settlement_month`, `created_at`, `updated_at`) " +
//            "VALUES (#{companyId}, #{companyName}, #{lastMonthBalance}, #{recordedMoney}, #{acceptance}, #{transfer}, #{balance},#{settlementMonth}, #{createdAt}, NULL)")
    int setMonthBalance(List<BalanceRepostResult> balanceRepostResult);

    List<BalanceRepostResult> getMonthBalance(BalanceRepostParam param);
    List<BalanceRepostResult> getMonthBalance1(BalanceRepostParam param);

    int savaBalance(BalanceRepostResult param);

    int updateBalance(BalanceRepostResult param);

    BalanceRepostResult getBalanceByMonth(Map<String, Object> map);

    List<BalanceRepostResult> getBalanceByMonthList(Map<String, Object> map);
    //BalanceRepostResult getBalanceByMonth(String companyId,String month);

}
